import request from '@/utils/request'

// 查询查询借支记录列表
export function listBorrowingLog(query) {
  return request({
    url: '/manage/borrowingLog/list',
    method: 'get',
    params: query
  })
}

//查询借支总额
export function countAmount(query) {
  return request({
    url: '/manage/borrowingLog/countAmount',
    method: 'get',
    params: query
  })
}

//** 查询个人借支信息 */
export function associationList(query) {
  return request({
    url: '/manage/borrowingLog/associationList',
    method: 'get',
    params: query
  })
}

// 查询查询借支记录详细
export function getBorrowingLog(borrowingLogId) {
  return request({
    url: '/manage/borrowingLog/' + borrowingLogId,
    method: 'get'
  })
}

// 新增查询借支记录
export function addBorrowingLog(data) {
  return request({
    url: '/manage/borrowingLog',
    method: 'post',
    data: data
  })
}

// 修改查询借支记录
export function updateBorrowingLog(data) {
  return request({
    url: '/manage/borrowingLog',
    method: 'put',
    data: data
  })
}

// 删除查询借支记录
export function delBorrowingLog(borrowingLogId) {
  return request({
    url: '/manage/borrowingLog/' + borrowingLogId,
    method: 'delete'
  })
}
